home *** CD-ROM | disk | FTP | other *** search
Gui4CLI script | 1980-01-03 | 2.0 KB | 79 lines |
- G4C
-
- ; This script assumes that ARexx is available.
-
- WINBIG -1 -1 260 90 "ARexx.gc"
- WinType 11110001
- usetopaz
-
- CTEXT 30 0 'Tapping into ARexx' topaz.font 9 2 0 000
-
- xonload
- GuiOpen ARexx.gc
-
- ; We shall create and then run a small ARexx program.
- ; Its job is to create and store, ready for use if and
- ; when they are needed, a small set of Env: variables.
-
- gosub ARexx.gc MakeRexx
-
- xonClose
- ; We clean up afterwards. If you wish to examine the new ARexx
- ; program before it is deleted, do so before exiting from this
- ; script. Otherwise you'll be too late.
-
- ifexists file ram:arx.rexx
- delete ram:arx.rexx
- endif
- GuiQuit ARexx.gc
-
- ; Five buttons to access the information which was stored
- ; by the ARexx program.
-
- XButton 10 16 120 12 'Date'
- update ARexx.gc 1 $.d
-
- XButton 10 30 120 12 'Time'
- update ARexx.gc 2 $.t
-
- XButton 10 44 120 12 'Day'
- update ARexx.gc 3 $.w
-
- XButton 10 58 120 12 'Month'
- update ARexx.gc 4 $.m
-
- XButton 10 72 120 12 'Days into year'
- update ARexx.gc 5 $.y
-
-
- Text 140 16 100 12 '' 20 NOBOX
- gadid 1
- Text 140 30 100 12 '' 20 NOBOX
- gadid 2
- Text 140 44 100 12 '' 20 NOBOX
- gadid 3
- Text 140 58 100 12 '' 20 NOBOX
- gadid 4
- Text 140 72 100 12 '' 20 NOBOX
- gadid 5
-
- ; Here, line by line, we build the required ARexx program.
- ; When it runs, it obtains date and time details by invoking the
- ; relevant forms of ARexx functions, and it stores those details
- ; as Env: variables.
- ; The setting of those variables is carried out by invoking a set
- ; a AmigaDOS commands. That is done from within the ARexx program by
- ; the use of 'address command' plus the details of each setting.
-
- xRoutine MakeRexx
- .arx = "/* */"
- append Env:.arx "address command 'setenv .d ' || date() \n"
- append Env:.arx "address command 'setenv .t ' || time('c') \n"
- append Env:.arx "address command 'setenv .w ' || date('w') \n"
- append Env:.arx "address command 'setenv .m ' || date('m') \n"
- append Env:.arx "address command 'setenv .y ' || date('d') \n"
- append Env:.arx "exit\n"
- rename Env:.arx Ram:arx.rexx
- wait file Ram:arx.rexx 100
- run 'rx Ram:arx.rexx'
-